// written by Jonathan Odom and Aneesh Butani

#ifndef XMLPARSER_H_
#define XMLPARSER_H_
#include <fstream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include "appt.h"
#include "event.h"

using namespace std;

class XMLParser
{
public:
	XMLParser();
	~XMLParser();
	XMLParser(string fileName);
	XMLParser(string fileName, int);
    void readAppt();
    void readBirthday();
    vector<Event> getEvents();
    vector<Event> getEvents(string filter);

private:
	static string APPT;
	static string DAY;
	static string SUBJECT;
	static string TIME;
	
	void readNodeBirthday(string node);

    vector<Event> myEvents;
    void readNodeAppt(string node);
    ifstream input; 
    string myFileName;
    string getInfoAppt(string node, string info);
    void getTimeRangeAppt(string node, string infoType, int range[]);
    void seperateTime(int range[], string times);
	
};

#endif /*XMLPARSER_H_*/
